import ala from 'ala'
import api from 'api'

/*
* 删除wiki，并递归更新
* @array 是否另存为
* @isSaveAs wiki数据
*/

export async function wikiDel (array, data) {
  var response = await api.entityDelete('Wiki', data.id, data.name)
  if (response) {
    array = ala.arrayDeepDel(array, data.id)
  }
  return array
}